﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Engine.Classes {
    import flash.events.*;
    import Engine.Transactions.*;
    import Engine.Managers.*;
    import Engine.*;

    public class SocialNetwork extends EventDispatcher {

        protected static const SHORT_STORY_TIMEOUT:Number = 2000;

        protected var m_sigTime:Number = 0;
        private var m_lastFeedTime:Number = 0;
        protected var m_hasPublishPermissions:Boolean = false;
        protected var m_hasEmailPermission:Boolean = false;
        protected var m_closePermissionDialogCallback:Function;
        protected var m_closeEmailPermissionDialogCallback:Function;

        public function getLoggedInUserId():String{
            return (null);
        }
        public function getLoggedInUser():SocialNetworkUser{
            return (null);
        }
        public function redirect(_arg1:String, _arg2:Object=null, _arg3:String="_parent", _arg4:Boolean=true):void{
            if (_arg4){
                _arg1 = (Config.SN_APP_URL + _arg1);
            };
            Utilities.launchURL(_arg1, _arg3, _arg2);
        }
        public function getFriendUsers():Array{
            return ([]);
        }
        public function getAppFriendsIds():Array{
            return ([]);
        }
        public function getSigTime():Number{
            return (this.m_sigTime);
        }
        public function sendNotification(_arg1:String, _arg2:Array, _arg3:Array):void{
            TransactionManager.addTransaction(new TSendNotification(_arg1, _arg2, _arg3));
        }
        public function publishFeedStory(_arg1:String, _arg2:Object, _arg3:Array, _arg4:Boolean, _arg5:Function=null, _arg6:int=0, _arg7:Boolean=false, _arg8:Boolean=false, _arg9:String=""):void{
            TransactionManager.addTransaction(new TPublishUserAction(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7), true, true);
        }
        public function getDefaultFeedImages():Array{
            return ([]);
        }
        public function showFeedDialog(_arg1:String, _arg2:Object, _arg3:Array, _arg4:Function=null):void{
        }
        public function streamPublish(_arg1:Object, _arg2:Object, _arg3:String, _arg4:String=null, _arg5:Function=null, _arg6:Boolean=false, _arg7:String=""):void{
        }
        public function showBookmarkDialog():void{
        }
        public function onFeedClosed():void{
            this.m_lastFeedTime = GlobalEngine.getTimer();
            if (GlobalEngine.feedCallbackTimer){
                GlobalEngine.feedCallbackTimer.stop();
                GlobalEngine.feedCallbackTimer = null;
            };
            if (GlobalEngine.onFeedCloseCallback != null){
                GlobalEngine.onFeedCloseCallback(null);
                GlobalEngine.onFeedCloseCallback = null;
            };
        }
        public function showStreamPermissions(_arg1:Function=null):void{
            this.m_closePermissionDialogCallback = _arg1;
        }
        public function onPermissionDialogClosed(_arg1:Boolean):void{
            this.m_hasPublishPermissions = _arg1;
            if (this.m_closePermissionDialogCallback != null){
                this.m_closePermissionDialogCallback();
                this.m_closePermissionDialogCallback = null;
            };
        }
        public function userHasStreamPermissions():Boolean{
            return (this.m_hasPublishPermissions);
        }
        public function showEmailPermission(_arg1:Function=null):void{
            this.m_closeEmailPermissionDialogCallback = _arg1;
        }
        public function onEmailPermissionDialogClosed(_arg1:Boolean):void{
            this.m_hasEmailPermission = _arg1;
            if (this.m_closeEmailPermissionDialogCallback != null){
                this.m_closeEmailPermissionDialogCallback(_arg1);
                this.m_closeEmailPermissionDialogCallback = null;
            };
        }
        public function set haveEmailPermission(_arg1:Boolean):void{
            this.m_hasEmailPermission = _arg1;
        }
        public function userHasEmailPermission():Boolean{
            return (this.m_hasEmailPermission);
        }

    }
}//package Engine.Classes 
